//
//  AprofitContentViewController.m
//  Distributor
//
//  Created by 主事丫环 on 2019/5/9.
//  Copyright © 2019 主事丫环. All rights reserved.
//

#import "AprofitContentViewController.h"
#import "CSlistModel.h"

@interface AprofitContentViewController ()
@property(nonatomic,strong)UIScrollView *scrollView;
@property(nonatomic,strong)CSlistModel *mymodel;

@end

@implementation AprofitContentViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"服务单";
    [self.leftbutton setImage:imgname(@"left_icon") forState:(UIControlStateNormal)];
    
        [self shodetalils];
   
    
}

-(void)shodetalils{
    
    if (!_mymodel) {
        _mymodel = [[CSlistModel alloc]init];
    }
        NSMutableDictionary *param  = [NSMutableDictionary dictionaryWithCapacity:1];
        param[@"id"] = _urls;
        [NetWorkTool POST:weixuidContent param:param success:^(id dic) {
            KMyLog(@"ssssssssssss%@",dic);
            [self->_mymodel setValuesForKeysWithDictionary:[dic objectForKey:@"data"]];
            [self showui];

        } other:^(id dic) {
            ShowToastWithText(dic[@"msg"]);

        } fail:^(NSError *error) {

        } needUser:YES];
    


    
    
}

- (void)setUI30 {
    [self.view addSubview:self.scrollView];
    CGFloat wei = 60;
    CGFloat left1 = 26;
    CGFloat left2 = 14;
    CGFloat uphei = 16;
    CGFloat lineuphei = 13;
    
    UIView *bbgvieww = [[UIView alloc]init];
    [self.scrollView addSubview:bbgvieww];
    CGFloat hh = 16;
    
    
    UIImageView *bgimage = [[UIImageView alloc]initWithFrame:CGRectMake(10, 0,KWIDTH-20,63)];
    bgimage.image = imgname(@"shouyiconbg");
    [self.scrollView addSubview:bgimage];
    
    UILabel *chouchenhg = [[UILabel alloc]initWithFrame:CGRectMake(15, 19, 90, 25)];
    chouchenhg.font = FontSize(14);
    chouchenhg.textColor = [UIColor whiteColor];;
    chouchenhg.text = @"我的抽成:";
    chouchenhg.font = FontSize(18);
    [bgimage addSubview:chouchenhg];
    UILabel *chouchenhglb = [[UILabel alloc]init];
    chouchenhglb.font = FontSize(14);
    chouchenhglb.textColor = [UIColor whiteColor];
    chouchenhglb.text = [NSString stringWithFormat:@"+%@",_mymodel.earning];
    chouchenhglb.textAlignment = NSTextAlignmentRight;
    chouchenhglb.font = FontSize(18);
    [bgimage addSubview:chouchenhglb];
    
    [chouchenhglb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.offset(19);
        make.height.offset(25);
        make.right.offset(-20);
    }];
    
    
    
    hh = bgimage.bottom+uphei;
    UIView *upbgWithLb = [[UILabel alloc]initWithFrame:CGRectMake(10, 63, KWIDTH-20, 132)];
    upbgWithLb.backgroundColor = [UIColor whiteColor];
    [self.scrollView addSubview:upbgWithLb];
    
    
    UILabel *updianpu = [[UILabel alloc]initWithFrame:CGRectMake(left1, hh, wei, 14)];
    updianpu.font = FontSize(14);
    updianpu.textColor = K999999;
    updianpu.text = @"所属区域";
    [self.scrollView addSubview:updianpu];
    
    UILabel *updianpulb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, hh, KWIDTH-left2-left1-wei-left1-20, 14)];
    updianpulb.font = FontSize(14);
    updianpulb.textColor = K666666;
    //    updianpulb.text = _mymodel.shop_name;
    updianpulb.text = _quyu;
    
    [self.scrollView addSubview:updianpulb];
    
    UILabel *line20 = [[UILabel alloc]initWithFrame:CGRectMake(left1, updianpu.bottom+lineuphei, KWIDTH-50, 1)];
    line20.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line20];
    hh =line20.bottom+16;
    
    UILabel *personl = [[UILabel alloc]initWithFrame:CGRectMake(left1, hh, wei, 14)];
    personl.font = FontSize(14);
    personl.textColor = K999999;
    personl.text = @"服务人员";
    [self.scrollView addSubview:personl];
    
    UILabel *personllb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, hh, KWIDTH-left2-left1-wei-left1-20, 14)];
    personllb.font = FontSize(14);
    personllb.textColor = K666666;
    personllb.text = [NSString stringWithFormat:@"%@师傅",_mymodel.personName];
    [self.scrollView addSubview:personllb];
    
    UILabel *line30 = [[UILabel alloc]initWithFrame:CGRectMake(left1, personl.bottom+lineuphei, KWIDTH-50, 1)];
    line30.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line30];
    
    
    hh =line30.bottom+uphei;
    
    UILabel *daozhnag = [[UILabel alloc]initWithFrame:CGRectMake(left1, hh, wei, 14)];
    daozhnag.font = FontSize(14);
    daozhnag.textColor = K999999;
    daozhnag.text = @"到账时间";
    [self.scrollView addSubview:daozhnag];
    
    UILabel *daozhnaglb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, hh, KWIDTH-left2-left1-wei-left1-20, 14)];
    daozhnaglb.font = FontSize(14);
    daozhnaglb.textColor = K666666;
    NSString *str1 = [_mymodel.pay_time substringWithRange:NSMakeRange(5,2)];
    NSString *str2 = [_mymodel.pay_time substringWithRange:NSMakeRange(8,2)];
    NSString *str3 = [_mymodel.pay_time substringWithRange:NSMakeRange(11,5)];
    daozhnaglb.text = [NSString stringWithFormat:@"%@月%@日 %@",str1,str2,str3];
    [self.scrollView addSubview:daozhnaglb];
    
    UILabel *line40 = [[UILabel alloc]initWithFrame:CGRectMake(left1, personl.bottom+16, KWIDTH-50, 1)];
    line40.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    //    [self.scrollView addSubview:line40];
    
    
    
    
    
    hh = upbgWithLb.bottom+26;
    
    //    if (_mymodel.order_type_id) {
    //企业用户
    //        UILabel *complay = [[UILabel alloc]initWithFrame:CGRectMake(left1, 20, wei, 14)];
    //        complay.font = FontSize(14);
    //        complay.textColor = K999999;
    //        complay.text = @"单位名称";
    //        [self.scrollView addSubview:complay];
    //
    //        UILabel *complaylb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, 20, KWIDTH-left2-left1-wei-left1-20, 14)];
    //        complaylb.font = FontSize(14);
    //        complaylb.textColor = K666666;
    //        complaylb.text = _mymodel.userName;
    //        [self.scrollView addSubview:complaylb];
    //
    //        UILabel *line1 = [[UILabel alloc]initWithFrame:CGRectMake(left1, complay.bottom+10, KWIDTH-left1-20, 1)];
    //        line1.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    //        [self.scrollView addSubview:line1];
    //        hh = line1.bottom+8;
    //    }
    
    UILabel *secvice = [[UILabel alloc]initWithFrame:CGRectMake(left1, hh, wei, 14)];
    secvice.font = FontSize(14);
    secvice.textColor = K999999;
    secvice.text = @"服务类型";
    [self.scrollView addSubview:secvice];
    
    UILabel *secvicelb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, hh, KWIDTH-left2-left1-wei-left1-20, 14)];
    secvicelb.font = FontSize(14);
    secvicelb.textColor = K666666;
    secvicelb.text = _mymodel.service_name;
    [self.scrollView addSubview:secvicelb];
    
    UILabel *line2 = [[UILabel alloc]initWithFrame:CGRectMake(left1, secvicelb.bottom+10, KWIDTH-left1-20, 1)];
    line2.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    
    [self.scrollView addSubview:line2];
    
    UILabel *produrt = [[UILabel alloc]initWithFrame:CGRectMake(left1, line2.bottom+8, wei, 14)];
    produrt.font = FontSize(14);
    produrt.textColor = K999999;
    produrt.text = @"电器品类";
    [self.scrollView addSubview:produrt];
    
    UILabel *produrtlb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line2.bottom+8,KWIDTH-100, 14)];
    produrtlb.font = FontSize(14);
    produrtlb.textColor = K666666;
    produrtlb.text = _mymodel.fault_name;
    [self.scrollView addSubview:produrtlb];
    
    
    UILabel *line3 = [[UILabel alloc]initWithFrame:CGRectMake(left1, produrt.bottom+10, KWIDTH-left1-20, 1)];
    line3.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    
    [self.scrollView addSubview:line3];
    
    
    
    UILabel *produrt1 = [[UILabel alloc]initWithFrame:CGRectMake(left1, line3.bottom+8, wei, 14)];
    produrt1.font = FontSize(14);
    produrt1.textColor = K999999;
    produrt1.text = @"故障原因";
    [self.scrollView addSubview:produrt1];
    
    UILabel *produrtlb1 = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line3.bottom+8,KWIDTH-100, 14)];
    produrtlb1.font = FontSize(14);
    produrtlb1.textColor = K666666;
    produrtlb1.text = _mymodel.common_failures;
    [self.scrollView addSubview:produrtlb1];
    
    
    UILabel *line33 = [[UILabel alloc]initWithFrame:CGRectMake(left1, produrt1.bottom+10, KWIDTH-left1-20, 1)];
    line33.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    
    [self.scrollView addSubview:line33];
    
    
    UILabel *guzhang = [[UILabel alloc]initWithFrame:CGRectMake(left1, line33.bottom+18, 90, 14)];
    guzhang.font = FontSize(14);
    guzhang.textColor = K999999;
    guzhang.text = @"备注信息";
    [self.scrollView addSubview:guzhang];
    
    
    CGFloat heig = [NSString heightWithWidth:KWIDTH-left2-left1-wei-left1-20 font:14 text:_mymodel.fault_comment];
    
    
    UILabel *guzhanglb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line33.bottom+15, KWIDTH-left2-left1-wei-left1-20, heig)];
    guzhanglb.font = FontSize(14);
    guzhanglb.textColor = K999999;
    guzhanglb.text = _mymodel.fault_comment;
    [self.scrollView addSubview:guzhanglb];
    

    
    UILabel *line4 = [[UILabel alloc]initWithFrame:CGRectMake(left1, guzhanglb.bottom+10, KWIDTH-left1-20, 1)];
    line4.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line4];
    
    
    UILabel *yuyueTime = [[UILabel alloc]initWithFrame:CGRectMake(left1, line4.bottom+8, 90, 14)];
    yuyueTime.font = FontSize(14);
    yuyueTime.textColor = K999999;
    yuyueTime.text = @"预约日期";
    [self.scrollView addSubview:yuyueTime];
    UILabel *yuyueTimelb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line4.bottom+8, KWIDTH-left2-left1-wei-left1-20, heig)];
    yuyueTimelb.font = FontSize(14);
    yuyueTimelb.textColor = K666666;
//    yuyueTimelb.text = _mymodel.order_date;
    NSArray *timearr = [_mymodel.order_date componentsSeparatedByString:@"-"];
    yuyueTimelb.text = [NSString stringWithFormat:@"%@年%@月%@日",timearr[0],timearr[1],timearr[2]];
    [self.scrollView addSubview:yuyueTimelb];
    UILabel *line5 = [[UILabel alloc]initWithFrame:CGRectMake(left1, yuyueTimelb.bottom+10, KWIDTH-left1-20, 1)];
    line5.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line5];
    
    
    UILabel *yuyueTime2 = [[UILabel alloc]initWithFrame:CGRectMake(left1, line5.bottom+8, 90, 14)];
    yuyueTime2.font = FontSize(14);
    yuyueTime2.textColor = K999999;
    yuyueTime2.text = @"预约时间";
    [self.scrollView addSubview:yuyueTime2];
    UILabel *yuyueTimelb2 = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line5.bottom+8, KWIDTH-left2-left1-wei-left1-20, heig)];
    yuyueTimelb2.font = FontSize(14);
    yuyueTimelb2.textColor = K666666;
    yuyueTimelb2.text = _mymodel.order_time;
    [self.scrollView addSubview:yuyueTimelb2];
    UILabel *line6 = [[UILabel alloc]initWithFrame:CGRectMake(left1, yuyueTimelb2.bottom+10, KWIDTH-left1-20, 1)];
    line6.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line6];
    
    
    UILabel *address = [[UILabel alloc]initWithFrame:CGRectMake(left1, line6.bottom+8, 30, 14)];
    address.font = FontSize(14);
    address.textColor = K999999;
    address.text = @"地址";
    [self.scrollView addSubview:address];
    
    
    CGFloat heig2 = [NSString heightWithWidth:KWIDTH-80 font:14 text:_mymodel.user_address];
    
    
    UILabel *addresslb = [[UILabel alloc]initWithFrame:CGRectMake(67, line6.bottom+8, KWIDTH-80 , heig2)];
    addresslb.font = FontSize(14);
    addresslb.textColor = K999999;
    addresslb.text = _mymodel.user_address;
    [self.scrollView addSubview:addresslb];
    addresslb.numberOfLines = 0;
    UILabel *name = [[UILabel alloc]initWithFrame:CGRectMake(67, addresslb.bottom+12, 60, 14)];
    name.font = FontSize(14);
    name.textColor = K666666;
    name.text = _mymodel.user_name;
    [self.scrollView addSubview:name];
    UILabel *phone = [[UILabel alloc]initWithFrame:CGRectMake(name.right, addresslb.bottom+12, KWIDTH-name.right-26, 14)];
    phone.font = FontSize(14);
    phone.textColor = K666666;
    phone.textAlignment = NSTextAlignmentRight;
    phone.text = _mymodel.user_phone;
    [self.scrollView addSubview:phone];
    
    UILabel *line7 = [[UILabel alloc]initWithFrame:CGRectMake(left1, phone.bottom+10, KWIDTH-left1-20, 1)];
    line7.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line7];
    
    
    UILabel *dianti = [[UILabel alloc]initWithFrame:CGRectMake(left1, line7.bottom+7, 30, 14)];
    dianti.font = FontSize(14);
    dianti.textColor = K999999;
    dianti.text = @"电梯";
    [self.scrollView addSubview:dianti];
    UILabel *diantilb = [[UILabel alloc]initWithFrame:CGRectMake(67, line7.bottom+7, 30, 14)];
    diantilb.font = FontSize(14);
    diantilb.textColor = K666666;
    diantilb.text = @"无";
    if ([_mymodel.has_elevator integerValue] == 1) {
        diantilb.text = @"有";
        
    }
    [self.scrollView addSubview:diantilb];
    UILabel *louceng = [[UILabel alloc]initWithFrame:CGRectMake(KWIDTH-100, line7.bottom+7, 30, 14)];
    louceng.font = FontSize(14);
    louceng.textColor = K999999;
    louceng.text = @"楼层";
    [self.scrollView addSubview:louceng];
    UILabel *loucenglb = [[UILabel alloc]initWithFrame:CGRectMake(KWIDTH-80, line7.bottom+7, 50, 14)];
    loucenglb.font = FontSize(14);
    loucenglb.textColor = K666666;
    loucenglb.textAlignment = NSTextAlignmentRight;
    loucenglb.text = [NSString stringWithFormat:@"%@楼",_mymodel.floorNum];
    [self.scrollView addSubview:loucenglb];
    
    
    
    bbgvieww.frame = CGRectMake(10, 205, KWIDTH-20, loucenglb.bottom+20-205);
    bbgvieww.backgroundColor = [UIColor whiteColor];
    //    bbgvieww.layer.masksToBounds = YES;
    //    bbgvieww.layer.cornerRadius = 12;
    
    
    
    
    
    _scrollView.contentSize = CGSizeMake(KWIDTH, loucenglb.bottom+20);
    
}

- (void)setUI31 {
    [self.view addSubview:self.scrollView];
    CGFloat wei = 60;
    CGFloat left1 = 26;
    CGFloat left2 = 14;
    CGFloat uphei = 16;
    CGFloat lineuphei = 13;
    
    UIView *bbgvieww = [[UIView alloc]init];
    [self.scrollView addSubview:bbgvieww];
    CGFloat hh = 16;
    
    
    UIImageView *bgimage = [[UIImageView alloc]initWithFrame:CGRectMake(10, 0,KWIDTH-20,63)];
    bgimage.image = imgname(@"shouyiconbg");
    [self.scrollView addSubview:bgimage];
    
    UILabel *chouchenhg = [[UILabel alloc]initWithFrame:CGRectMake(15, 19, 90, 25)];
    chouchenhg.font = FontSize(14);
    chouchenhg.textColor = [UIColor whiteColor];;
    chouchenhg.text = @"我的抽成:";
    chouchenhg.font = FontSize(18);
    [bgimage addSubview:chouchenhg];
    UILabel *chouchenhglb = [[UILabel alloc]init];
    chouchenhglb.font = FontSize(14);
    chouchenhglb.textColor = [UIColor whiteColor];
    chouchenhglb.text = [NSString stringWithFormat:@"+%@",_mymodel.earning];
    chouchenhglb.textAlignment = NSTextAlignmentRight;
    chouchenhglb.font = FontSize(18);
    [bgimage addSubview:chouchenhglb];
    
    [chouchenhglb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.offset(19);
        make.height.offset(25);
        make.right.offset(-20);
    }];
    
    
    
    hh = bgimage.bottom+uphei;
    UIView *upbgWithLb = [[UILabel alloc]initWithFrame:CGRectMake(10, 63, KWIDTH-20, 132)];
    upbgWithLb.backgroundColor = [UIColor whiteColor];
    [self.scrollView addSubview:upbgWithLb];
    
    
    UILabel *updianpu = [[UILabel alloc]initWithFrame:CGRectMake(left1, hh, wei, 14)];
    updianpu.font = FontSize(14);
    updianpu.textColor = K999999;
    updianpu.text = @"所属区域";
    [self.scrollView addSubview:updianpu];
    
    UILabel *updianpulb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, hh, KWIDTH-left2-left1-wei-left1-20, 14)];
    updianpulb.font = FontSize(14);
    updianpulb.textColor = K666666;
    //    updianpulb.text = _mymodel.shop_name;
    updianpulb.text = _quyu;
    
    [self.scrollView addSubview:updianpulb];
    
    UILabel *line20 = [[UILabel alloc]initWithFrame:CGRectMake(left1, updianpu.bottom+lineuphei, KWIDTH-50, 1)];
    line20.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line20];
    hh =line20.bottom+16;
    
    UILabel *personl = [[UILabel alloc]initWithFrame:CGRectMake(left1, hh, wei, 14)];
    personl.font = FontSize(14);
    personl.textColor = K999999;
    personl.text = @"服务人员";
    [self.scrollView addSubview:personl];
    
    UILabel *personllb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, hh, KWIDTH-left2-left1-wei-left1-20, 14)];
    personllb.font = FontSize(14);
    personllb.textColor = K666666;
    personllb.text = [NSString stringWithFormat:@"%@师傅",_mymodel.personName];
    [self.scrollView addSubview:personllb];
    
    UILabel *line30 = [[UILabel alloc]initWithFrame:CGRectMake(left1, personl.bottom+lineuphei, KWIDTH-50, 1)];
    line30.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line30];
    
    
    hh =line30.bottom+uphei;
    
    UILabel *daozhnag = [[UILabel alloc]initWithFrame:CGRectMake(left1, hh, wei, 14)];
    daozhnag.font = FontSize(14);
    daozhnag.textColor = K999999;
    daozhnag.text = @"到账时间";
    [self.scrollView addSubview:daozhnag];
    
    UILabel *daozhnaglb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, hh, KWIDTH-left2-left1-wei-left1-20, 14)];
    daozhnaglb.font = FontSize(14);
    daozhnaglb.textColor = K666666;
    NSString *str1 = [_mymodel.pay_time substringWithRange:NSMakeRange(5,2)];
    NSString *str2 = [_mymodel.pay_time substringWithRange:NSMakeRange(8,2)];
    NSString *str3 = [_mymodel.pay_time substringWithRange:NSMakeRange(11,5)];
    daozhnaglb.text = [NSString stringWithFormat:@"%@月%@日 %@",str1,str2,str3];
    [self.scrollView addSubview:daozhnaglb];
    
    UILabel *line40 = [[UILabel alloc]initWithFrame:CGRectMake(left1, personl.bottom+16, KWIDTH-50, 1)];
    line40.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    //    [self.scrollView addSubview:line40];
    
    
    
    
    
    hh = upbgWithLb.bottom+26;
    
    //    if (_mymodel.order_type_id) {
    //企业用户
    //        UILabel *complay = [[UILabel alloc]initWithFrame:CGRectMake(left1, 20, wei, 14)];
    //        complay.font = FontSize(14);
    //        complay.textColor = K999999;
    //        complay.text = @"单位名称";
    //        [self.scrollView addSubview:complay];
    //
    //        UILabel *complaylb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, 20, KWIDTH-left2-left1-wei-left1-20, 14)];
    //        complaylb.font = FontSize(14);
    //        complaylb.textColor = K666666;
    //        complaylb.text = _mymodel.userName;
    //        [self.scrollView addSubview:complaylb];
    //
    //        UILabel *line1 = [[UILabel alloc]initWithFrame:CGRectMake(left1, complay.bottom+10, KWIDTH-left1-20, 1)];
    //        line1.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    //        [self.scrollView addSubview:line1];
    //        hh = line1.bottom+8;
    //    }
    
    
    UILabel *secvice1 = [[UILabel alloc]initWithFrame:CGRectMake(left1, hh, wei, 14)];
    secvice1.font = FontSize(14);
    secvice1.textColor = K999999;
    secvice1.text = @"单位名称";
    [self.scrollView addSubview:secvice1];
    
    UILabel *secvicelb1 = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, hh, KWIDTH-left2-left1-wei-left1-20, 14)];
    secvicelb1.font = FontSize(14);
    secvicelb1.textColor = K666666;
    secvicelb1.text = _mymodel.company_name;
    [self.scrollView addSubview:secvicelb1];
    
    UILabel *line22 = [[UILabel alloc]initWithFrame:CGRectMake(left1, secvicelb1.bottom+10, KWIDTH-left1-20, 1)];
    line22.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    
    [self.scrollView addSubview:line22];
    
    
    
    
    UILabel *secvice = [[UILabel alloc]initWithFrame:CGRectMake(left1, line22.bottom+10, wei, 14)];
    secvice.font = FontSize(14);
    secvice.textColor = K999999;
    secvice.text = @"服务类型";
    [self.scrollView addSubview:secvice];
    
    UILabel *secvicelb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line22.bottom+10, KWIDTH-left2-left1-wei-left1-20, 14)];
    secvicelb.font = FontSize(14);
    secvicelb.textColor = K666666;
    secvicelb.text = _mymodel.service_name;
    [self.scrollView addSubview:secvicelb];
    
    
    UILabel *line2 = [[UILabel alloc]initWithFrame:CGRectMake(left1, secvicelb.bottom+10, KWIDTH-left1-20, 1)];
    line2.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    
    [self.scrollView addSubview:line2];
    
    UILabel *produrt = [[UILabel alloc]initWithFrame:CGRectMake(left1, line2.bottom+8, wei, 14)];
    produrt.font = FontSize(14);
    produrt.textColor = K999999;
    produrt.text = @"电器品类";
    [self.scrollView addSubview:produrt];
    
    UILabel *produrtlb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line2.bottom+8,KWIDTH-100, 14)];
    produrtlb.font = FontSize(14);
    produrtlb.textColor = K666666;
    produrtlb.text = _mymodel.fault_name;
    [self.scrollView addSubview:produrtlb];
    
    
    UILabel *line3 = [[UILabel alloc]initWithFrame:CGRectMake(left1, produrt.bottom+10, KWIDTH-left1-20, 1)];
    line3.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    
    [self.scrollView addSubview:line3];
    
    
    UILabel *countL = [[UILabel alloc]initWithFrame:CGRectMake(left1, line3.bottom+8, wei, 14)];
    countL.font = FontSize(14);
    countL.textColor = K999999;
    countL.text = @"报修数量";
    [self.scrollView addSubview:countL];
    
    UILabel *count = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line3.bottom+8,KWIDTH-100, 14)];
    count.font = FontSize(14);
    count.textColor = K666666;
    count.text = [NSString stringWithFormat:@"%.0f台",_mymodel.repair_number];
    [self.scrollView addSubview:count];
    
    
    UILabel *line333 = [[UILabel alloc]initWithFrame:CGRectMake(left1, countL.bottom+10, KWIDTH-left1-20, 1)];
    line333.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    
    [self.scrollView addSubview:line333];
    
    
    
    UILabel *produrt1 = [[UILabel alloc]initWithFrame:CGRectMake(left1, line333.bottom+8, wei, 14)];
    produrt1.font = FontSize(14);
    produrt1.textColor = K999999;
    produrt1.text = @"故障原因";
    [self.scrollView addSubview:produrt1];
    
    UILabel *produrtlb1 = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line333.bottom+8,KWIDTH-100, 14)];
    produrtlb1.font = FontSize(14);
    produrtlb1.textColor = K666666;
    produrtlb1.text = _mymodel.common_failures;
    [self.scrollView addSubview:produrtlb1];
    
    
    UILabel *line33 = [[UILabel alloc]initWithFrame:CGRectMake(left1, produrt1.bottom+10, KWIDTH-left1-20, 1)];
    line33.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    
    [self.scrollView addSubview:line33];
    
    
    UILabel *guzhang = [[UILabel alloc]initWithFrame:CGRectMake(left1, line33.bottom+18, 90, 14)];
    guzhang.font = FontSize(14);
    guzhang.textColor = K999999;
    guzhang.text = @"备注信息";
    [self.scrollView addSubview:guzhang];
    
    
    CGFloat heig = [NSString heightWithWidth:KWIDTH-left2-left1-wei-left1-20 font:14 text:_mymodel.fault_comment];
    
    
    UILabel *guzhanglb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line33.bottom+15, KWIDTH-left2-left1-wei-left1-20, heig)];
    guzhanglb.font = FontSize(14);
    guzhanglb.textColor = K999999;
    guzhanglb.text = _mymodel.fault_comment;
    [self.scrollView addSubview:guzhanglb];
    
    
    
    UILabel *line4 = [[UILabel alloc]initWithFrame:CGRectMake(left1, guzhanglb.bottom+10, KWIDTH-left1-20, 1)];
    line4.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line4];
    
    
    UILabel *yuyueTime = [[UILabel alloc]initWithFrame:CGRectMake(left1, line4.bottom+8, 90, 14)];
    yuyueTime.font = FontSize(14);
    yuyueTime.textColor = K999999;
    yuyueTime.text = @"预约日期";
    [self.scrollView addSubview:yuyueTime];
    UILabel *yuyueTimelb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line4.bottom+8, KWIDTH-left2-left1-wei-left1-20, heig)];
    yuyueTimelb.font = FontSize(14);
    yuyueTimelb.textColor = K666666;
//    yuyueTimelb.text = _mymodel.order_date;
    NSArray *timearr = [_mymodel.order_date componentsSeparatedByString:@"-"];
    yuyueTimelb.text = [NSString stringWithFormat:@"%@年%@月%@日",timearr[0],timearr[1],timearr[2]];
    [self.scrollView addSubview:yuyueTimelb];
    UILabel *line5 = [[UILabel alloc]initWithFrame:CGRectMake(left1, yuyueTimelb.bottom+10, KWIDTH-left1-20, 1)];
    line5.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line5];
    
    
    UILabel *yuyueTime2 = [[UILabel alloc]initWithFrame:CGRectMake(left1, line5.bottom+8, 90, 14)];
    yuyueTime2.font = FontSize(14);
    yuyueTime2.textColor = K999999;
    yuyueTime2.text = @"预约时间";
    [self.scrollView addSubview:yuyueTime2];
    UILabel *yuyueTimelb2 = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line5.bottom+8, KWIDTH-left2-left1-wei-left1-20, heig)];
    yuyueTimelb2.font = FontSize(14);
    yuyueTimelb2.textColor = K666666;
    yuyueTimelb2.text = _mymodel.order_time;
    [self.scrollView addSubview:yuyueTimelb2];
    UILabel *line6 = [[UILabel alloc]initWithFrame:CGRectMake(left1, yuyueTimelb2.bottom+10, KWIDTH-left1-20, 1)];
    line6.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line6];
    
    
    UILabel *address = [[UILabel alloc]initWithFrame:CGRectMake(left1, line6.bottom+8, 30, 14)];
    address.font = FontSize(14);
    address.textColor = K999999;
    address.text = @"地址";
    [self.scrollView addSubview:address];
    
    
    CGFloat heig2 = [NSString heightWithWidth:KWIDTH-80 font:14 text:_mymodel.user_address];
    
    
    UILabel *addresslb = [[UILabel alloc]initWithFrame:CGRectMake(67, line6.bottom+8, KWIDTH-80 , heig2)];
    addresslb.font = FontSize(14);
    addresslb.textColor = K999999;
    addresslb.text = _mymodel.user_address;
    [self.scrollView addSubview:addresslb];
    addresslb.numberOfLines = 0;
    UILabel *name = [[UILabel alloc]initWithFrame:CGRectMake(67, addresslb.bottom+12, 60, 14)];
    name.font = FontSize(14);
    name.textColor = K666666;
    name.text = _mymodel.user_name;
    [self.scrollView addSubview:name];
    UILabel *phone = [[UILabel alloc]initWithFrame:CGRectMake(name.right, addresslb.bottom+12, KWIDTH-name.right-26, 14)];
    phone.font = FontSize(14);
    phone.textColor = K666666;
    phone.textAlignment = NSTextAlignmentRight;
    phone.text = _mymodel.user_phone;
    [self.scrollView addSubview:phone];
    
    UILabel *line7 = [[UILabel alloc]initWithFrame:CGRectMake(left1, phone.bottom+10, KWIDTH-left1-20, 1)];
    line7.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line7];
    
    
    UILabel *dianti = [[UILabel alloc]initWithFrame:CGRectMake(left1, line7.bottom+7, 30, 14)];
    dianti.font = FontSize(14);
    dianti.textColor = K999999;
    dianti.text = @"电梯";
    [self.scrollView addSubview:dianti];
    UILabel *diantilb = [[UILabel alloc]initWithFrame:CGRectMake(67, line7.bottom+7, 30, 14)];
    diantilb.font = FontSize(14);
    diantilb.textColor = K666666;
    diantilb.text = @"无";
    if ([_mymodel.has_elevator integerValue] == 1) {
        diantilb.text = @"有";
        
    }
    [self.scrollView addSubview:diantilb];
    
    UILabel *louceng = [[UILabel alloc]initWithFrame:CGRectMake(KWIDTH-100, line7.bottom+7, 30, 14)];
    louceng.font = FontSize(14);
    louceng.textColor = K999999;
    louceng.text = @"楼层";
    [self.scrollView addSubview:louceng];
    UILabel *loucenglb = [[UILabel alloc]initWithFrame:CGRectMake(KWIDTH-80, line7.bottom+7, 50, 14)];
    loucenglb.font = FontSize(14);
    loucenglb.textColor = K666666;
    loucenglb.textAlignment = NSTextAlignmentRight;
    loucenglb.text = [NSString stringWithFormat:@"%@楼",_mymodel.floorNum];
    [self.scrollView addSubview:loucenglb];
    
    
    
    bbgvieww.frame = CGRectMake(10, 205, KWIDTH-20, loucenglb.bottom+20-205);
    bbgvieww.backgroundColor = [UIColor whiteColor];
    //    bbgvieww.layer.masksToBounds = YES;
    //    bbgvieww.layer.cornerRadius = 12;
    
    
    
    
    
    _scrollView.contentSize = CGSizeMake(KWIDTH, loucenglb.bottom+20);
}

- (void)setUI32 {
    [self.view addSubview:self.scrollView];
    CGFloat wei = 60;
    CGFloat left1 = 26;
    CGFloat left2 = 14;
    CGFloat uphei = 16;
    CGFloat lineuphei = 13;
    
    UIView *bbgvieww = [[UIView alloc]init];
    [self.scrollView addSubview:bbgvieww];
    CGFloat hh = 16;
    
    
    UIImageView *bgimage = [[UIImageView alloc]initWithFrame:CGRectMake(10, 0,KWIDTH-20,63)];
    bgimage.image = imgname(@"shouyiconbg");
    [self.scrollView addSubview:bgimage];
    
    UILabel *chouchenhg = [[UILabel alloc]initWithFrame:CGRectMake(15, 19, 90, 25)];
    chouchenhg.font = FontSize(14);
    chouchenhg.textColor = [UIColor whiteColor];;
    chouchenhg.text = @"我的抽成:";
    chouchenhg.font = FontSize(18);
    [bgimage addSubview:chouchenhg];
    UILabel *chouchenhglb = [[UILabel alloc]init];
    chouchenhglb.font = FontSize(14);
    chouchenhglb.textColor = [UIColor whiteColor];
    chouchenhglb.text = [NSString stringWithFormat:@"+%@",_mymodel.earning];
    chouchenhglb.textAlignment = NSTextAlignmentRight;
    chouchenhglb.font = FontSize(18);
    [bgimage addSubview:chouchenhglb];
    
    [chouchenhglb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.offset(19);
        make.height.offset(25);
        make.right.offset(-20);
    }];
    
    
    
    hh = bgimage.bottom+uphei;
    UIView *upbgWithLb = [[UILabel alloc]initWithFrame:CGRectMake(10, 63, KWIDTH-20, 132)];
    upbgWithLb.backgroundColor = [UIColor whiteColor];
    [self.scrollView addSubview:upbgWithLb];
    
    
    UILabel *updianpu = [[UILabel alloc]initWithFrame:CGRectMake(left1, hh, wei, 14)];
    updianpu.font = FontSize(14);
    updianpu.textColor = K999999;
    updianpu.text = @"所属区域";
    [self.scrollView addSubview:updianpu];
    
    UILabel *updianpulb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, hh, KWIDTH-left2-left1-wei-left1-20, 14)];
    updianpulb.font = FontSize(14);
    updianpulb.textColor = K666666;
    //    updianpulb.text = _mymodel.shop_name;
    updianpulb.text = _quyu;
    
    [self.scrollView addSubview:updianpulb];
    
    UILabel *line20 = [[UILabel alloc]initWithFrame:CGRectMake(left1, updianpu.bottom+lineuphei, KWIDTH-50, 1)];
    line20.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line20];
    hh =line20.bottom+16;
    
    UILabel *personl = [[UILabel alloc]initWithFrame:CGRectMake(left1, hh, wei, 14)];
    personl.font = FontSize(14);
    personl.textColor = K999999;
    personl.text = @"服务人员";
    [self.scrollView addSubview:personl];
    
    UILabel *personllb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, hh, KWIDTH-left2-left1-wei-left1-20, 14)];
    personllb.font = FontSize(14);
    personllb.textColor = K666666;
    personllb.text = [NSString stringWithFormat:@"%@师傅",_mymodel.personName];
    [self.scrollView addSubview:personllb];
    
    UILabel *line30 = [[UILabel alloc]initWithFrame:CGRectMake(left1, personl.bottom+lineuphei, KWIDTH-50, 1)];
    line30.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line30];
    
    
    hh =line30.bottom+uphei;
    
    UILabel *daozhnag = [[UILabel alloc]initWithFrame:CGRectMake(left1, hh, wei, 14)];
    daozhnag.font = FontSize(14);
    daozhnag.textColor = K999999;
    daozhnag.text = @"到账时间";
    [self.scrollView addSubview:daozhnag];
    
    UILabel *daozhnaglb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, hh, KWIDTH-left2-left1-wei-left1-20, 14)];
    daozhnaglb.font = FontSize(14);
    daozhnaglb.textColor = K666666;
    NSString *str1 = [_mymodel.pay_time substringWithRange:NSMakeRange(5,2)];
    NSString *str2 = [_mymodel.pay_time substringWithRange:NSMakeRange(8,2)];
    NSString *str3 = [_mymodel.pay_time substringWithRange:NSMakeRange(11,5)];
    daozhnaglb.text = [NSString stringWithFormat:@"%@月%@日 %@",str1,str2,str3];
    [self.scrollView addSubview:daozhnaglb];
    
    UILabel *line40 = [[UILabel alloc]initWithFrame:CGRectMake(left1, personl.bottom+16, KWIDTH-50, 1)];
    line40.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    //    [self.scrollView addSubview:line40];
    
    
    
    
    
    hh = upbgWithLb.bottom+26;
    
    //    if (_mymodel.order_type_id) {
    //企业用户
    //        UILabel *complay = [[UILabel alloc]initWithFrame:CGRectMake(left1, 20, wei, 14)];
    //        complay.font = FontSize(14);
    //        complay.textColor = K999999;
    //        complay.text = @"单位名称";
    //        [self.scrollView addSubview:complay];
    //
    //        UILabel *complaylb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, 20, KWIDTH-left2-left1-wei-left1-20, 14)];
    //        complaylb.font = FontSize(14);
    //        complaylb.textColor = K666666;
    //        complaylb.text = _mymodel.userName;
    //        [self.scrollView addSubview:complaylb];
    //
    //        UILabel *line1 = [[UILabel alloc]initWithFrame:CGRectMake(left1, complay.bottom+10, KWIDTH-left1-20, 1)];
    //        line1.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    //        [self.scrollView addSubview:line1];
    //        hh = line1.bottom+8;
    //    }
    
    
    UILabel *secvice1 = [[UILabel alloc]initWithFrame:CGRectMake(left1, hh, wei, 14)];
    secvice1.font = FontSize(14);
    secvice1.textColor = K999999;
    secvice1.text = @"厂家名称";
    [self.scrollView addSubview:secvice1];
    
    UILabel *secvicelb1 = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, hh, KWIDTH-left2-left1-wei-left1-20, 14)];
    secvicelb1.font = FontSize(14);
    secvicelb1.textColor = [UIColor colorWithHexString:@"#CA9F61"];
    secvicelb1.text = _mymodel.company_name;
    [self.scrollView addSubview:secvicelb1];
    
    UILabel *line22 = [[UILabel alloc]initWithFrame:CGRectMake(left1, secvicelb1.bottom+10, KWIDTH-left1-20, 1)];
    line22.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    
    [self.scrollView addSubview:line22];
    
    
    
    
    UILabel *secvice = [[UILabel alloc]initWithFrame:CGRectMake(left1, line22.bottom+10, wei, 14)];
    secvice.font = FontSize(14);
    secvice.textColor = K999999;
    secvice.text = @"服务类型";
    [self.scrollView addSubview:secvice];
    
    UILabel *secvicelb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line22.bottom+10, KWIDTH-left2-left1-wei-left1-20, 14)];
    secvicelb.font = FontSize(14);
    secvicelb.textColor = K666666;
    secvicelb.text = _mymodel.service_name;
    [self.scrollView addSubview:secvicelb];
    
    UILabel *isGuarantee = [[UILabel alloc]initWithFrame:CGRectMake(KWIDTH-20-60, line22.bottom+10, 60, 14)];
    isGuarantee.font = FontSize(14);
    isGuarantee.textColor = [UIColor colorWithHexString:@"#CA9F61"];
    if ([_mymodel.fault_type isEqualToString:@"3"]) {
        if ([_mymodel.is_protect boolValue]) {
            isGuarantee.text = @"保内";
        }else{
            isGuarantee.text = @"保外";
        }
    }else {
        isGuarantee.text = @"";
    }
    [self.scrollView addSubview:isGuarantee];
    
    UILabel *line2 = [[UILabel alloc]initWithFrame:CGRectMake(left1, secvicelb.bottom+10, KWIDTH-left1-20, 1)];
    line2.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    
    [self.scrollView addSubview:line2];
    
    UILabel *produrt = [[UILabel alloc]initWithFrame:CGRectMake(left1, line2.bottom+8, wei, 14)];
    produrt.font = FontSize(14);
    produrt.textColor = K999999;
    produrt.text = @"电器品类";
    [self.scrollView addSubview:produrt];
    
    UILabel *produrtlb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line2.bottom+8,KWIDTH-100, 14)];
    produrtlb.font = FontSize(14);
    produrtlb.textColor = K666666;
    produrtlb.text = _mymodel.fault_name;
    [self.scrollView addSubview:produrtlb];
    
    
    UILabel *line3 = [[UILabel alloc]initWithFrame:CGRectMake(left1, produrt.bottom+10, KWIDTH-left1-20, 1)];
    line3.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    
    [self.scrollView addSubview:line3];
    
    
    
    UILabel *produrt1 = [[UILabel alloc]initWithFrame:CGRectMake(left1, line3.bottom+8, wei, 14)];
    produrt1.font = FontSize(14);
    produrt1.textColor = K999999;
    produrt1.text = @"故障原因";
    [self.scrollView addSubview:produrt1];
    
    UILabel *produrtlb1 = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line3.bottom+8,KWIDTH-100, 14)];
    produrtlb1.font = FontSize(14);
    produrtlb1.textColor = K666666;
    produrtlb1.text = _mymodel.common_failures;
    [self.scrollView addSubview:produrtlb1];
    
    
    UILabel *line33 = [[UILabel alloc]initWithFrame:CGRectMake(left1, produrt1.bottom+10, KWIDTH-left1-20, 1)];
    line33.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    
    [self.scrollView addSubview:line33];
    
    
    UILabel *guzhang = [[UILabel alloc]initWithFrame:CGRectMake(left1, line33.bottom+18, 90, 14)];
    guzhang.font = FontSize(14);
    guzhang.textColor = K999999;
    guzhang.text = @"备注信息";
    [self.scrollView addSubview:guzhang];
    
    
    CGFloat heig = [NSString heightWithWidth:KWIDTH-left2-left1-wei-left1-20 font:14 text:_mymodel.fault_comment];
    
    
    UILabel *guzhanglb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line33.bottom+15, KWIDTH-left2-left1-wei-left1-20, heig)];
    guzhanglb.font = FontSize(14);
    guzhanglb.textColor = K999999;
    guzhanglb.text = _mymodel.fault_comment;
    [self.scrollView addSubview:guzhanglb];
    
    
    
    UILabel *line4 = [[UILabel alloc]initWithFrame:CGRectMake(left1, guzhanglb.bottom+10, KWIDTH-left1-20, 1)];
    line4.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line4];
    
    
    UILabel *yuyueTime = [[UILabel alloc]initWithFrame:CGRectMake(left1, line4.bottom+8, 90, 14)];
    yuyueTime.font = FontSize(14);
    yuyueTime.textColor = K999999;
    yuyueTime.text = @"预约日期";
    [self.scrollView addSubview:yuyueTime];
    UILabel *yuyueTimelb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line4.bottom+8, KWIDTH-left2-left1-wei-left1-20, heig)];
    yuyueTimelb.font = FontSize(14);
    yuyueTimelb.textColor = K666666;
//    yuyueTimelb.text = _mymodel.order_date;
    NSArray *timearr = [_mymodel.order_date componentsSeparatedByString:@"-"];
    yuyueTimelb.text = [NSString stringWithFormat:@"%@年%@月%@日",timearr[0],timearr[1],timearr[2]];
    [self.scrollView addSubview:yuyueTimelb];
    UILabel *line5 = [[UILabel alloc]initWithFrame:CGRectMake(left1, yuyueTimelb.bottom+10, KWIDTH-left1-20, 1)];
    line5.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line5];
    
    
    UILabel *yuyueTime2 = [[UILabel alloc]initWithFrame:CGRectMake(left1, line5.bottom+8, 90, 14)];
    yuyueTime2.font = FontSize(14);
    yuyueTime2.textColor = K999999;
    yuyueTime2.text = @"预约时间";
    [self.scrollView addSubview:yuyueTime2];
    UILabel *yuyueTimelb2 = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line5.bottom+8, KWIDTH-left2-left1-wei-left1-20, heig)];
    yuyueTimelb2.font = FontSize(14);
    yuyueTimelb2.textColor = K666666;
    yuyueTimelb2.text = _mymodel.order_time;
    [self.scrollView addSubview:yuyueTimelb2];
    UILabel *line6 = [[UILabel alloc]initWithFrame:CGRectMake(left1, yuyueTimelb2.bottom+10, KWIDTH-left1-20, 1)];
    line6.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line6];
    
    
    UILabel *address = [[UILabel alloc]initWithFrame:CGRectMake(left1, line6.bottom+8, 30, 14)];
    address.font = FontSize(14);
    address.textColor = K999999;
    address.text = @"地址";
    [self.scrollView addSubview:address];
    
    
    CGFloat heig2 = [NSString heightWithWidth:KWIDTH-80 font:14 text:_mymodel.user_address];
    
    
    UILabel *addresslb = [[UILabel alloc]initWithFrame:CGRectMake(67, line6.bottom+8, KWIDTH-80 , heig2)];
    addresslb.font = FontSize(14);
    addresslb.textColor = K999999;
    addresslb.text = _mymodel.user_address;
    [self.scrollView addSubview:addresslb];
    addresslb.numberOfLines = 0;
    UILabel *name = [[UILabel alloc]initWithFrame:CGRectMake(67, addresslb.bottom+12, 60, 14)];
    name.font = FontSize(14);
    name.textColor = K666666;
    name.text = _mymodel.user_name;
    [self.scrollView addSubview:name];
    UILabel *phone = [[UILabel alloc]initWithFrame:CGRectMake(name.right, addresslb.bottom+12, KWIDTH-name.right-26, 14)];
    phone.font = FontSize(14);
    phone.textColor = K666666;
    phone.textAlignment = NSTextAlignmentRight;
    phone.text = _mymodel.user_phone;
    [self.scrollView addSubview:phone];
    
    UILabel *line7 = [[UILabel alloc]initWithFrame:CGRectMake(left1, phone.bottom+10, KWIDTH-left1-20, 1)];
    line7.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line7];
    
    
    UILabel *dianti = [[UILabel alloc]initWithFrame:CGRectMake(left1, line7.bottom+7, 30, 14)];
    dianti.font = FontSize(14);
    dianti.textColor = K999999;
    dianti.text = @"电梯";
    [self.scrollView addSubview:dianti];
    UILabel *diantilb = [[UILabel alloc]initWithFrame:CGRectMake(67, line7.bottom+7, 30, 14)];
    diantilb.font = FontSize(14);
    diantilb.textColor = K666666;
    diantilb.text = @"无";
    if ([_mymodel.has_elevator integerValue] == 1) {
        diantilb.text = @"有";
        
    }
    [self.scrollView addSubview:diantilb];
    
    UILabel *louceng = [[UILabel alloc]initWithFrame:CGRectMake(KWIDTH-100, line7.bottom+7, 30, 14)];
    louceng.font = FontSize(14);
    louceng.textColor = K999999;
    louceng.text = @"楼层";
    [self.scrollView addSubview:louceng];
    
    UILabel *loucenglb = [[UILabel alloc]initWithFrame:CGRectMake(KWIDTH-80, line7.bottom+7, 50, 14)];
    loucenglb.font = FontSize(14);
    loucenglb.textColor = K666666;
    loucenglb.textAlignment = NSTextAlignmentRight;
    loucenglb.text = [NSString stringWithFormat:@"%@楼",_mymodel.floorNum];
    [self.scrollView addSubview:loucenglb];
    
    
    
    bbgvieww.frame = CGRectMake(10, 205, KWIDTH-20, loucenglb.bottom+20-205);
    bbgvieww.backgroundColor = [UIColor whiteColor];
    //    bbgvieww.layer.masksToBounds = YES;
    //    bbgvieww.layer.cornerRadius = 12;
    
    
    
    
    
    _scrollView.contentSize = CGSizeMake(KWIDTH, loucenglb.bottom+20);
}

- (void)setUI0 {
    [self.view addSubview:self.scrollView];
    CGFloat wei = 60;
    CGFloat left1 = 26;
    CGFloat left2 = 14;
    CGFloat uphei = 16;
    CGFloat lineuphei = 13;
    
    UIView *bbgvieww = [[UIView alloc]init];
    [self.scrollView addSubview:bbgvieww];
    CGFloat hh = 16;
    
    
    UIImageView *bgimage = [[UIImageView alloc]initWithFrame:CGRectMake(10, 0,KWIDTH-20,63)];
    bgimage.image = imgname(@"shouyiconbg");
    [self.scrollView addSubview:bgimage];
    
    UILabel *chouchenhg = [[UILabel alloc]initWithFrame:CGRectMake(15, 19, 90, 25)];
    chouchenhg.font = FontSize(14);
    chouchenhg.textColor = [UIColor whiteColor];;
    chouchenhg.text = @"我的抽成:";
    chouchenhg.font = FontSize(18);
    [bgimage addSubview:chouchenhg];
    UILabel *chouchenhglb = [[UILabel alloc]init];
    chouchenhglb.font = FontSize(14);
    chouchenhglb.textColor = [UIColor whiteColor];
    chouchenhglb.text = [NSString stringWithFormat:@"+%@",_mymodel.earning];
    chouchenhglb.textAlignment = NSTextAlignmentRight;
    chouchenhglb.font = FontSize(18);
    [bgimage addSubview:chouchenhglb];
    
    [chouchenhglb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.offset(19);
        make.height.offset(25);
        make.right.offset(-20);
    }];
    
    
    
    hh = bgimage.bottom+uphei;
    UIView *upbgWithLb = [[UILabel alloc]initWithFrame:CGRectMake(10, 63, KWIDTH-20, 132)];
    upbgWithLb.backgroundColor = [UIColor whiteColor];
    [self.scrollView addSubview:upbgWithLb];
    
    
    UILabel *updianpu = [[UILabel alloc]initWithFrame:CGRectMake(left1, hh, wei, 14)];
    updianpu.font = FontSize(14);
    updianpu.textColor = K999999;
    updianpu.text = @"所属区域";
    [self.scrollView addSubview:updianpu];
    
    UILabel *updianpulb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, hh, KWIDTH-left2-left1-wei-left1-20, 14)];
    updianpulb.font = FontSize(14);
    updianpulb.textColor = K666666;
    //    updianpulb.text = _mymodel.shop_name;
    updianpulb.text = _quyu;
    
    [self.scrollView addSubview:updianpulb];
    
    UILabel *line20 = [[UILabel alloc]initWithFrame:CGRectMake(left1, updianpu.bottom+lineuphei, KWIDTH-50, 1)];
    line20.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line20];
    hh =line20.bottom+16;
    
    UILabel *personl = [[UILabel alloc]initWithFrame:CGRectMake(left1, hh, wei, 14)];
    personl.font = FontSize(14);
    personl.textColor = K999999;
    personl.text = @"服务人员";
    [self.scrollView addSubview:personl];
    
    UILabel *personllb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, hh, KWIDTH-left2-left1-wei-left1-20, 14)];
    personllb.font = FontSize(14);
    personllb.textColor = K666666;
    personllb.text = [NSString stringWithFormat:@"%@师傅",_mymodel.personName];
    [self.scrollView addSubview:personllb];
    
    UILabel *line30 = [[UILabel alloc]initWithFrame:CGRectMake(left1, personl.bottom+lineuphei, KWIDTH-50, 1)];
    line30.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line30];
    
    
    hh =line30.bottom+uphei;
    
    UILabel *daozhnag = [[UILabel alloc]initWithFrame:CGRectMake(left1, hh, wei, 14)];
    daozhnag.font = FontSize(14);
    daozhnag.textColor = K999999;
    daozhnag.text = @"到账时间";
    [self.scrollView addSubview:daozhnag];
    
    UILabel *daozhnaglb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, hh, KWIDTH-left2-left1-wei-left1-20, 14)];
    daozhnaglb.font = FontSize(14);
    daozhnaglb.textColor = K666666;
    NSString *str1 = [_mymodel.pay_time substringWithRange:NSMakeRange(5,2)];
    NSString *str2 = [_mymodel.pay_time substringWithRange:NSMakeRange(8,2)];
    NSString *str3 = [_mymodel.pay_time substringWithRange:NSMakeRange(11,5)];
    daozhnaglb.text = [NSString stringWithFormat:@"%@月%@日 %@",str1,str2,str3];
    [self.scrollView addSubview:daozhnaglb];
    
    UILabel *line40 = [[UILabel alloc]initWithFrame:CGRectMake(left1, personl.bottom+16, KWIDTH-50, 1)];
    line40.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    //    [self.scrollView addSubview:line40];
    
    
    
    
    
    hh = upbgWithLb.bottom+26;
    
    //    if (_mymodel.order_type_id) {
    //企业用户
    //        UILabel *complay = [[UILabel alloc]initWithFrame:CGRectMake(left1, 20, wei, 14)];
    //        complay.font = FontSize(14);
    //        complay.textColor = K999999;
    //        complay.text = @"单位名称";
    //        [self.scrollView addSubview:complay];
    //
    //        UILabel *complaylb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, 20, KWIDTH-left2-left1-wei-left1-20, 14)];
    //        complaylb.font = FontSize(14);
    //        complaylb.textColor = K666666;
    //        complaylb.text = _mymodel.userName;
    //        [self.scrollView addSubview:complaylb];
    //
    //        UILabel *line1 = [[UILabel alloc]initWithFrame:CGRectMake(left1, complay.bottom+10, KWIDTH-left1-20, 1)];
    //        line1.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    //        [self.scrollView addSubview:line1];
    //        hh = line1.bottom+8;
    //    }
    
    UILabel *secvice = [[UILabel alloc]initWithFrame:CGRectMake(left1, hh, wei, 14)];
    secvice.font = FontSize(14);
    secvice.textColor = K999999;
    secvice.text = @"服务类型";
    [self.scrollView addSubview:secvice];
    
    UILabel *secvicelb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, hh, KWIDTH-left2-left1-wei-left1-20, 14)];
    secvicelb.font = FontSize(14);
    secvicelb.textColor = K666666;
    secvicelb.text = _mymodel.service_name;
    [self.scrollView addSubview:secvicelb];
    
    UILabel *line2 = [[UILabel alloc]initWithFrame:CGRectMake(left1, secvicelb.bottom+10, KWIDTH-left1-20, 1)];
    line2.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    
    [self.scrollView addSubview:line2];
    
    UILabel *produrt = [[UILabel alloc]initWithFrame:CGRectMake(left1, line2.bottom+8, wei, 14)];
    produrt.font = FontSize(14);
    produrt.textColor = K999999;
    produrt.text = @"电器品类";
    [self.scrollView addSubview:produrt];
    
    UILabel *produrtlb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line2.bottom+8,KWIDTH-100, 14)];
    produrtlb.font = FontSize(14);
    produrtlb.textColor = K666666;
    produrtlb.text = _mymodel.fault_name;
    [self.scrollView addSubview:produrtlb];
    
    
    UILabel *line3 = [[UILabel alloc]initWithFrame:CGRectMake(left1, produrt.bottom+10, KWIDTH-left1-20, 1)];
    line3.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    
    [self.scrollView addSubview:line3];
    
    
    
    
    UILabel *guzhang = [[UILabel alloc]initWithFrame:CGRectMake(left1, line3.bottom+18, 90, 14)];
    guzhang.font = FontSize(14);
    guzhang.textColor = K999999;
    guzhang.text = @"备注信息";
    [self.scrollView addSubview:guzhang];
    
    
    CGFloat heig = [NSString heightWithWidth:KWIDTH-left2-left1-wei-left1-20 font:14 text:_mymodel.fault_comment];
    
    
    UILabel *guzhanglb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line3.bottom+15, KWIDTH-left2-left1-wei-left1-20, heig)];
    guzhanglb.font = FontSize(14);
    guzhanglb.textColor = K999999;
    guzhanglb.text = _mymodel.fault_comment;
    [self.scrollView addSubview:guzhanglb];
    
    UILabel *line4 = [[UILabel alloc]initWithFrame:CGRectMake(left1, guzhanglb.bottom+10, KWIDTH-left1-20, 1)];
    line4.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line4];
    
    
    UILabel *yuyueTime = [[UILabel alloc]initWithFrame:CGRectMake(left1, line4.bottom+8, 90, 14)];
    yuyueTime.font = FontSize(14);
    yuyueTime.textColor = K999999;
    yuyueTime.text = @"预约日期";
    [self.scrollView addSubview:yuyueTime];
    UILabel *yuyueTimelb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line4.bottom+8, KWIDTH-left2-left1-wei-left1-20, heig)];
    yuyueTimelb.font = FontSize(14);
    yuyueTimelb.textColor = K666666;
//    yuyueTimelb.text = _mymodel.order_date;
    NSArray *timearr = [_mymodel.order_date componentsSeparatedByString:@"-"];
    yuyueTimelb.text = [NSString stringWithFormat:@"%@年%@月%@日",timearr[0],timearr[1],timearr[2]];
    [self.scrollView addSubview:yuyueTimelb];
    UILabel *line5 = [[UILabel alloc]initWithFrame:CGRectMake(left1, yuyueTimelb.bottom+10, KWIDTH-left1-20, 1)];
    line5.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line5];
    
    
    UILabel *yuyueTime2 = [[UILabel alloc]initWithFrame:CGRectMake(left1, line5.bottom+8, 90, 14)];
    yuyueTime2.font = FontSize(14);
    yuyueTime2.textColor = K999999;
    yuyueTime2.text = @"预约时间";
    [self.scrollView addSubview:yuyueTime2];
    UILabel *yuyueTimelb2 = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line5.bottom+8, KWIDTH-left2-left1-wei-left1-20, heig)];
    yuyueTimelb2.font = FontSize(14);
    yuyueTimelb2.textColor = K666666;
    yuyueTimelb2.text = _mymodel.order_time;
    [self.scrollView addSubview:yuyueTimelb2];
    UILabel *line6 = [[UILabel alloc]initWithFrame:CGRectMake(left1, yuyueTimelb2.bottom+10, KWIDTH-left1-20, 1)];
    line6.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line6];
    
    
    UILabel *address = [[UILabel alloc]initWithFrame:CGRectMake(left1, line6.bottom+8, 30, 14)];
    address.font = FontSize(14);
    address.textColor = K999999;
    address.text = @"地址";
    [self.scrollView addSubview:address];
    
    
    CGFloat heig2 = [NSString heightWithWidth:KWIDTH-80 font:14 text:_mymodel.user_address];
    
    
    UILabel *addresslb = [[UILabel alloc]initWithFrame:CGRectMake(67, line6.bottom+8, KWIDTH-80 , heig2)];
    addresslb.font = FontSize(14);
    addresslb.textColor = K999999;
    addresslb.text = _mymodel.user_address;
    [self.scrollView addSubview:addresslb];
    addresslb.numberOfLines = 0;
    UILabel *name = [[UILabel alloc]initWithFrame:CGRectMake(67, addresslb.bottom+12, 60, 14)];
    name.font = FontSize(14);
    name.textColor = K666666;
    name.text = _mymodel.user_name;
    [self.scrollView addSubview:name];
    UILabel *phone = [[UILabel alloc]initWithFrame:CGRectMake(name.right, addresslb.bottom+12, KWIDTH-name.right-26, 14)];
    phone.font = FontSize(14);
    phone.textColor = K666666;
    phone.textAlignment = NSTextAlignmentRight;
    phone.text = _mymodel.user_phone;
    [self.scrollView addSubview:phone];
    
    UILabel *line7 = [[UILabel alloc]initWithFrame:CGRectMake(left1, phone.bottom+10, KWIDTH-left1-20, 1)];
    line7.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line7];
    
    
    UILabel *dianti = [[UILabel alloc]initWithFrame:CGRectMake(left1, line7.bottom+7, 30, 14)];
    dianti.font = FontSize(14);
    dianti.textColor = K999999;
    dianti.text = @"电梯";
    [self.scrollView addSubview:dianti];
    UILabel *diantilb = [[UILabel alloc]initWithFrame:CGRectMake(67, line7.bottom+7, 30, 14)];
    diantilb.font = FontSize(14);
    diantilb.textColor = K666666;
    diantilb.text = @"无";
    if ([_mymodel.has_elevator integerValue] == 1) {
        diantilb.text = @"有";
        
    }
    [self.scrollView addSubview:diantilb];
    
    UILabel *louceng = [[UILabel alloc]initWithFrame:CGRectMake(KWIDTH-100, line7.bottom+7, 30, 14)];
    louceng.font = FontSize(14);
    louceng.textColor = K999999;
    louceng.text = @"楼层";
    [self.scrollView addSubview:louceng];
    UILabel *loucenglb = [[UILabel alloc]initWithFrame:CGRectMake(KWIDTH-80, line7.bottom+7, 50, 14)];
    loucenglb.font = FontSize(14);
    loucenglb.textColor = K666666;
    loucenglb.textAlignment = NSTextAlignmentRight;
    loucenglb.text = [NSString stringWithFormat:@"%@楼",_mymodel.floorNum];
    [self.scrollView addSubview:loucenglb];
    
    
    
    bbgvieww.frame = CGRectMake(10, 205, KWIDTH-20, loucenglb.bottom+20-205);
    bbgvieww.backgroundColor = [UIColor whiteColor];
    //    bbgvieww.layer.masksToBounds = YES;
    //    bbgvieww.layer.cornerRadius = 12;
    
    
    
    
    
    _scrollView.contentSize = CGSizeMake(KWIDTH, loucenglb.bottom+20);
    
}

- (void)setUI1 {
    [self.view addSubview:self.scrollView];
    CGFloat wei = 60;
    CGFloat left1 = 26;
    CGFloat left2 = 14;
    CGFloat uphei = 16;
    CGFloat lineuphei = 13;
    
    UIView *bbgvieww = [[UIView alloc]init];
    [self.scrollView addSubview:bbgvieww];
    CGFloat hh = 16;
    
    
    UIImageView *bgimage = [[UIImageView alloc]initWithFrame:CGRectMake(10, 0,KWIDTH-20,63)];
    bgimage.image = imgname(@"shouyiconbg");
    [self.scrollView addSubview:bgimage];
    
    UILabel *chouchenhg = [[UILabel alloc]initWithFrame:CGRectMake(15, 19, 90, 25)];
    chouchenhg.font = FontSize(14);
    chouchenhg.textColor = [UIColor whiteColor];;
    chouchenhg.text = @"我的抽成:";
    chouchenhg.font = FontSize(18);
    [bgimage addSubview:chouchenhg];
    UILabel *chouchenhglb = [[UILabel alloc]init];
    chouchenhglb.font = FontSize(14);
    chouchenhglb.textColor = [UIColor whiteColor];
    chouchenhglb.text = [NSString stringWithFormat:@"+%@",_mymodel.earning];
    chouchenhglb.textAlignment = NSTextAlignmentRight;
    chouchenhglb.font = FontSize(18);
    [bgimage addSubview:chouchenhglb];
    
    [chouchenhglb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.offset(19);
        make.height.offset(25);
        make.right.offset(-20);
    }];
    
    
    
    hh = bgimage.bottom+uphei;
    UIView *upbgWithLb = [[UILabel alloc]initWithFrame:CGRectMake(10, 63, KWIDTH-20, 132)];
    upbgWithLb.backgroundColor = [UIColor whiteColor];
    [self.scrollView addSubview:upbgWithLb];
    
    
    UILabel *updianpu = [[UILabel alloc]initWithFrame:CGRectMake(left1, hh, wei, 14)];
    updianpu.font = FontSize(14);
    updianpu.textColor = K999999;
    updianpu.text = @"所属区域";
    [self.scrollView addSubview:updianpu];
    
    UILabel *updianpulb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, hh, KWIDTH-left2-left1-wei-left1-20, 14)];
    updianpulb.font = FontSize(14);
    updianpulb.textColor = K666666;
    //    updianpulb.text = _mymodel.shop_name;
    updianpulb.text = _quyu;
    
    [self.scrollView addSubview:updianpulb];
    
    UILabel *line20 = [[UILabel alloc]initWithFrame:CGRectMake(left1, updianpu.bottom+lineuphei, KWIDTH-50, 1)];
    line20.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line20];
    hh =line20.bottom+16;
    
    UILabel *personl = [[UILabel alloc]initWithFrame:CGRectMake(left1, hh, wei, 14)];
    personl.font = FontSize(14);
    personl.textColor = K999999;
    personl.text = @"服务人员";
    [self.scrollView addSubview:personl];
    
    UILabel *personllb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, hh, KWIDTH-left2-left1-wei-left1-20, 14)];
    personllb.font = FontSize(14);
    personllb.textColor = K666666;
    personllb.text = [NSString stringWithFormat:@"%@师傅",_mymodel.personName];
    [self.scrollView addSubview:personllb];
    
    UILabel *line30 = [[UILabel alloc]initWithFrame:CGRectMake(left1, personl.bottom+lineuphei, KWIDTH-50, 1)];
    line30.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line30];
    
    
    hh =line30.bottom+uphei;
    
    UILabel *daozhnag = [[UILabel alloc]initWithFrame:CGRectMake(left1, hh, wei, 14)];
    daozhnag.font = FontSize(14);
    daozhnag.textColor = K999999;
    daozhnag.text = @"到账时间";
    [self.scrollView addSubview:daozhnag];
    
    UILabel *daozhnaglb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, hh, KWIDTH-left2-left1-wei-left1-20, 14)];
    daozhnaglb.font = FontSize(14);
    daozhnaglb.textColor = K666666;
    NSString *str1 = [_mymodel.pay_time substringWithRange:NSMakeRange(5,2)];
    NSString *str2 = [_mymodel.pay_time substringWithRange:NSMakeRange(8,2)];
    NSString *str3 = [_mymodel.pay_time substringWithRange:NSMakeRange(11,5)];
    daozhnaglb.text = [NSString stringWithFormat:@"%@月%@日 %@",str1,str2,str3];
    [self.scrollView addSubview:daozhnaglb];
    
    UILabel *line40 = [[UILabel alloc]initWithFrame:CGRectMake(left1, personl.bottom+16, KWIDTH-50, 1)];
    line40.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    //    [self.scrollView addSubview:line40];
    
    
    
    
    
    hh = upbgWithLb.bottom+26;
    
    //    if (_mymodel.order_type_id) {
    //企业用户
    //        UILabel *complay = [[UILabel alloc]initWithFrame:CGRectMake(left1, 20, wei, 14)];
    //        complay.font = FontSize(14);
    //        complay.textColor = K999999;
    //        complay.text = @"单位名称";
    //        [self.scrollView addSubview:complay];
    //
    //        UILabel *complaylb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, 20, KWIDTH-left2-left1-wei-left1-20, 14)];
    //        complaylb.font = FontSize(14);
    //        complaylb.textColor = K666666;
    //        complaylb.text = _mymodel.userName;
    //        [self.scrollView addSubview:complaylb];
    //
    //        UILabel *line1 = [[UILabel alloc]initWithFrame:CGRectMake(left1, complay.bottom+10, KWIDTH-left1-20, 1)];
    //        line1.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    //        [self.scrollView addSubview:line1];
    //        hh = line1.bottom+8;
    //    }
    
    
    UILabel *secvice1 = [[UILabel alloc]initWithFrame:CGRectMake(left1, hh, wei, 14)];
    secvice1.font = FontSize(14);
    secvice1.textColor = K999999;
    secvice1.text = @"单位名称";
    [self.scrollView addSubview:secvice1];
    
    UILabel *secvicelb1 = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, hh, KWIDTH-left2-left1-wei-left1-20, 14)];
    secvicelb1.font = FontSize(14);
    secvicelb1.textColor = K666666;
    secvicelb1.text = _mymodel.company_name;
    [self.scrollView addSubview:secvicelb1];
    
    UILabel *line22 = [[UILabel alloc]initWithFrame:CGRectMake(left1, secvicelb1.bottom+10, KWIDTH-left1-20, 1)];
    line22.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    
    [self.scrollView addSubview:line22];
    
    
    
    
    UILabel *secvice = [[UILabel alloc]initWithFrame:CGRectMake(left1, line22.bottom+10, wei, 14)];
    secvice.font = FontSize(14);
    secvice.textColor = K999999;
    secvice.text = @"服务类型";
    [self.scrollView addSubview:secvice];
    
    UILabel *secvicelb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line22.bottom+10, KWIDTH-left2-left1-wei-left1-20, 14)];
    secvicelb.font = FontSize(14);
    secvicelb.textColor = K666666;
    secvicelb.text = _mymodel.service_name;
    [self.scrollView addSubview:secvicelb];
    
    
    UILabel *line2 = [[UILabel alloc]initWithFrame:CGRectMake(left1, secvicelb.bottom+10, KWIDTH-left1-20, 1)];
    line2.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    
    [self.scrollView addSubview:line2];
    
    UILabel *produrt = [[UILabel alloc]initWithFrame:CGRectMake(left1, line2.bottom+8, wei, 14)];
    produrt.font = FontSize(14);
    produrt.textColor = K999999;
    produrt.text = @"电器品类";
    [self.scrollView addSubview:produrt];
    
    UILabel *produrtlb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line2.bottom+8,KWIDTH-100, 14)];
    produrtlb.font = FontSize(14);
    produrtlb.textColor = K666666;
    produrtlb.text = _mymodel.fault_name;
    [self.scrollView addSubview:produrtlb];
    
    
    UILabel *line3 = [[UILabel alloc]initWithFrame:CGRectMake(left1, produrt.bottom+10, KWIDTH-left1-20, 1)];
    line3.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    
    [self.scrollView addSubview:line3];
    
    
    UILabel *countL = [[UILabel alloc]initWithFrame:CGRectMake(left1, line3.bottom+8, wei, 14)];
    countL.font = FontSize(14);
    countL.textColor = K999999;
    countL.text = @"报修数量";
    [self.scrollView addSubview:countL];
    
    UILabel *count = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line3.bottom+8,KWIDTH-100, 14)];
    count.font = FontSize(14);
    count.textColor = K666666;
    count.text = [NSString stringWithFormat:@"%.0f台",_mymodel.repair_number];
    [self.scrollView addSubview:count];
    
    
    UILabel *line333 = [[UILabel alloc]initWithFrame:CGRectMake(left1, countL.bottom+10, KWIDTH-left1-20, 1)];
    line333.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    
    [self.scrollView addSubview:line333];
    
    
    
    UILabel *guzhang = [[UILabel alloc]initWithFrame:CGRectMake(left1, line333.bottom+18, 90, 14)];
    guzhang.font = FontSize(14);
    guzhang.textColor = K999999;
    guzhang.text = @"备注信息";
    [self.scrollView addSubview:guzhang];
    
    
    CGFloat heig = [NSString heightWithWidth:KWIDTH-left2-left1-wei-left1-20 font:14 text:_mymodel.fault_comment];
    
    
    UILabel *guzhanglb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line333.bottom+15, KWIDTH-left2-left1-wei-left1-20, heig)];
    guzhanglb.font = FontSize(14);
    guzhanglb.textColor = K999999;
    guzhanglb.text = _mymodel.fault_comment;
    [self.scrollView addSubview:guzhanglb];
    
    
    
    UILabel *line4 = [[UILabel alloc]initWithFrame:CGRectMake(left1, guzhanglb.bottom+10, KWIDTH-left1-20, 1)];
    line4.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line4];
    
    
    UILabel *yuyueTime = [[UILabel alloc]initWithFrame:CGRectMake(left1, line4.bottom+8, 90, 14)];
    yuyueTime.font = FontSize(14);
    yuyueTime.textColor = K999999;
    yuyueTime.text = @"预约日期";
    [self.scrollView addSubview:yuyueTime];
    UILabel *yuyueTimelb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line4.bottom+8, KWIDTH-left2-left1-wei-left1-20, heig)];
    yuyueTimelb.font = FontSize(14);
    yuyueTimelb.textColor = K666666;
//    yuyueTimelb.text = _mymodel.order_date;
    NSArray *timearr = [_mymodel.order_date componentsSeparatedByString:@"-"];
    yuyueTimelb.text = [NSString stringWithFormat:@"%@年%@月%@日",timearr[0],timearr[1],timearr[2]];
    [self.scrollView addSubview:yuyueTimelb];
    UILabel *line5 = [[UILabel alloc]initWithFrame:CGRectMake(left1, yuyueTimelb.bottom+10, KWIDTH-left1-20, 1)];
    line5.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line5];
    
    
    UILabel *yuyueTime2 = [[UILabel alloc]initWithFrame:CGRectMake(left1, line5.bottom+8, 90, 14)];
    yuyueTime2.font = FontSize(14);
    yuyueTime2.textColor = K999999;
    yuyueTime2.text = @"预约时间";
    [self.scrollView addSubview:yuyueTime2];
    UILabel *yuyueTimelb2 = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line5.bottom+8, KWIDTH-left2-left1-wei-left1-20, heig)];
    yuyueTimelb2.font = FontSize(14);
    yuyueTimelb2.textColor = K666666;
    yuyueTimelb2.text = _mymodel.order_time;
    [self.scrollView addSubview:yuyueTimelb2];
    UILabel *line6 = [[UILabel alloc]initWithFrame:CGRectMake(left1, yuyueTimelb2.bottom+10, KWIDTH-left1-20, 1)];
    line6.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line6];
    
    
    UILabel *address = [[UILabel alloc]initWithFrame:CGRectMake(left1, line6.bottom+8, 30, 14)];
    address.font = FontSize(14);
    address.textColor = K999999;
    address.text = @"地址";
    [self.scrollView addSubview:address];
    
    
    CGFloat heig2 = [NSString heightWithWidth:KWIDTH-80 font:14 text:_mymodel.user_address];
    
    
    UILabel *addresslb = [[UILabel alloc]initWithFrame:CGRectMake(67, line6.bottom+8, KWIDTH-80 , heig2)];
    addresslb.font = FontSize(14);
    addresslb.textColor = K999999;
    addresslb.text = _mymodel.user_address;
    [self.scrollView addSubview:addresslb];
    addresslb.numberOfLines = 0;
    UILabel *name = [[UILabel alloc]initWithFrame:CGRectMake(67, addresslb.bottom+12, 60, 14)];
    name.font = FontSize(14);
    name.textColor = K666666;
    name.text = _mymodel.user_name;
    [self.scrollView addSubview:name];
    UILabel *phone = [[UILabel alloc]initWithFrame:CGRectMake(name.right, addresslb.bottom+12, KWIDTH-name.right-26, 14)];
    phone.font = FontSize(14);
    phone.textColor = K666666;
    phone.textAlignment = NSTextAlignmentRight;
    phone.text = _mymodel.user_phone;
    [self.scrollView addSubview:phone];
    
    UILabel *line7 = [[UILabel alloc]initWithFrame:CGRectMake(left1, phone.bottom+10, KWIDTH-left1-20, 1)];
    line7.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line7];
    
    
    UILabel *dianti = [[UILabel alloc]initWithFrame:CGRectMake(left1, line7.bottom+7, 30, 14)];
    dianti.font = FontSize(14);
    dianti.textColor = K999999;
    dianti.text = @"电梯";
    [self.scrollView addSubview:dianti];
    UILabel *diantilb = [[UILabel alloc]initWithFrame:CGRectMake(67, line7.bottom+7, 30, 14)];
    diantilb.font = FontSize(14);
    diantilb.textColor = K666666;
    diantilb.text = @"无";
    if ([_mymodel.has_elevator integerValue] == 1) {
        diantilb.text = @"有";
        
    }
    [self.scrollView addSubview:diantilb];
    
    UILabel *louceng = [[UILabel alloc]initWithFrame:CGRectMake(KWIDTH-100, line7.bottom+7, 30, 14)];
    louceng.font = FontSize(14);
    louceng.textColor = K999999;
    louceng.text = @"楼层";
    [self.scrollView addSubview:louceng];
    UILabel *loucenglb = [[UILabel alloc]initWithFrame:CGRectMake(KWIDTH-80, line7.bottom+7, 50, 14)];
    loucenglb.font = FontSize(14);
    loucenglb.textColor = K666666;
    loucenglb.textAlignment = NSTextAlignmentRight;
    loucenglb.text = [NSString stringWithFormat:@"%@楼",_mymodel.floorNum];
    [self.scrollView addSubview:loucenglb];
    
    
    
    bbgvieww.frame = CGRectMake(10, 205, KWIDTH-20, loucenglb.bottom+20-205);
    bbgvieww.backgroundColor = [UIColor whiteColor];
    //    bbgvieww.layer.masksToBounds = YES;
    //    bbgvieww.layer.cornerRadius = 12;
    
    
    
    
    
    _scrollView.contentSize = CGSizeMake(KWIDTH, loucenglb.bottom+20);
}

- (void)setUI2 {
    [self.view addSubview:self.scrollView];
    CGFloat wei = 60;
    CGFloat left1 = 26;
    CGFloat left2 = 14;
    CGFloat uphei = 16;
    CGFloat lineuphei = 13;
    
    UIView *bbgvieww = [[UIView alloc]init];
    [self.scrollView addSubview:bbgvieww];
    CGFloat hh = 16;
    
    
    UIImageView *bgimage = [[UIImageView alloc]initWithFrame:CGRectMake(10, 0,KWIDTH-20,63)];
    bgimage.image = imgname(@"shouyiconbg");
    [self.scrollView addSubview:bgimage];
    
    UILabel *chouchenhg = [[UILabel alloc]initWithFrame:CGRectMake(15, 19, 90, 25)];
    chouchenhg.font = FontSize(14);
    chouchenhg.textColor = [UIColor whiteColor];;
    chouchenhg.text = @"我的抽成:";
    chouchenhg.font = FontSize(18);
    [bgimage addSubview:chouchenhg];
    UILabel *chouchenhglb = [[UILabel alloc]init];
    chouchenhglb.font = FontSize(14);
    chouchenhglb.textColor = [UIColor whiteColor];
    chouchenhglb.text = [NSString stringWithFormat:@"+%@",_mymodel.earning];
    chouchenhglb.textAlignment = NSTextAlignmentRight;
    chouchenhglb.font = FontSize(18);
    [bgimage addSubview:chouchenhglb];
    
    [chouchenhglb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.offset(19);
        make.height.offset(25);
        make.right.offset(-20);
    }];
    
    
    
    hh = bgimage.bottom+uphei;
    UIView *upbgWithLb = [[UILabel alloc]initWithFrame:CGRectMake(10, 63, KWIDTH-20, 132)];
    upbgWithLb.backgroundColor = [UIColor whiteColor];
    [self.scrollView addSubview:upbgWithLb];
    
    
    UILabel *updianpu = [[UILabel alloc]initWithFrame:CGRectMake(left1, hh, wei, 14)];
    updianpu.font = FontSize(14);
    updianpu.textColor = K999999;
    updianpu.text = @"所属区域";
    [self.scrollView addSubview:updianpu];
    
    UILabel *updianpulb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, hh, KWIDTH-left2-left1-wei-left1-20, 14)];
    updianpulb.font = FontSize(14);
    updianpulb.textColor = K666666;
    //    updianpulb.text = _mymodel.shop_name;
    updianpulb.text = _quyu;
    
    [self.scrollView addSubview:updianpulb];
    
    UILabel *line20 = [[UILabel alloc]initWithFrame:CGRectMake(left1, updianpu.bottom+lineuphei, KWIDTH-50, 1)];
    line20.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line20];
    hh =line20.bottom+16;
    
    UILabel *personl = [[UILabel alloc]initWithFrame:CGRectMake(left1, hh, wei, 14)];
    personl.font = FontSize(14);
    personl.textColor = K999999;
    personl.text = @"服务人员";
    [self.scrollView addSubview:personl];
    
    UILabel *personllb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, hh, KWIDTH-left2-left1-wei-left1-20, 14)];
    personllb.font = FontSize(14);
    personllb.textColor = K666666;
    personllb.text = [NSString stringWithFormat:@"%@师傅",_mymodel.personName];
    [self.scrollView addSubview:personllb];
    
    UILabel *line30 = [[UILabel alloc]initWithFrame:CGRectMake(left1, personl.bottom+lineuphei, KWIDTH-50, 1)];
    line30.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line30];
    
    
    hh =line30.bottom+uphei;
    
    UILabel *daozhnag = [[UILabel alloc]initWithFrame:CGRectMake(left1, hh, wei, 14)];
    daozhnag.font = FontSize(14);
    daozhnag.textColor = K999999;
    daozhnag.text = @"到账时间";
    [self.scrollView addSubview:daozhnag];
    
    UILabel *daozhnaglb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, hh, KWIDTH-left2-left1-wei-left1-20, 14)];
    daozhnaglb.font = FontSize(14);
    daozhnaglb.textColor = K666666;
    NSString *str1 = [_mymodel.pay_time substringWithRange:NSMakeRange(5,2)];
    NSString *str2 = [_mymodel.pay_time substringWithRange:NSMakeRange(8,2)];
    NSString *str3 = [_mymodel.pay_time substringWithRange:NSMakeRange(11,5)];
    daozhnaglb.text = [NSString stringWithFormat:@"%@月%@日 %@",str1,str2,str3];
    [self.scrollView addSubview:daozhnaglb];
    
    UILabel *line40 = [[UILabel alloc]initWithFrame:CGRectMake(left1, personl.bottom+16, KWIDTH-50, 1)];
    line40.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    //    [self.scrollView addSubview:line40];
    
    
    
    
    
    hh = upbgWithLb.bottom+26;

    
    UILabel *secvice1 = [[UILabel alloc]initWithFrame:CGRectMake(left1, hh, wei, 14)];
    secvice1.font = FontSize(14);
    secvice1.textColor = K999999;
    secvice1.text = @"厂家名称";
    [self.scrollView addSubview:secvice1];
    
    UILabel *secvicelb1 = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, hh, KWIDTH-left2-left1-wei-left1-20, 14)];
    secvicelb1.font = FontSize(14);
    secvicelb1.textColor = [UIColor colorWithHexString:@"#CA9F61"];
    secvicelb1.text = _mymodel.company_name;
    [self.scrollView addSubview:secvicelb1];
    
    UILabel *line22 = [[UILabel alloc]initWithFrame:CGRectMake(left1, secvicelb1.bottom+10, KWIDTH-left1-20, 1)];
    line22.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    
    [self.scrollView addSubview:line22];
    
    
    
    
    UILabel *secvice = [[UILabel alloc]initWithFrame:CGRectMake(left1, line22.bottom+10, wei, 14)];
    secvice.font = FontSize(14);
    secvice.textColor = K999999;
    secvice.text = @"服务类型";
    [self.scrollView addSubview:secvice];
    
    UILabel *secvicelb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line22.bottom+10, KWIDTH-left2-left1-wei-left1-20, 14)];
    secvicelb.font = FontSize(14);
    secvicelb.textColor = K666666;
    secvicelb.text = _mymodel.service_name;
    [self.scrollView addSubview:secvicelb];
    
    UILabel *isGuarantee = [[UILabel alloc]initWithFrame:CGRectMake(KWIDTH-20-60, line22.bottom+10, 60, 14)];
    isGuarantee.font = FontSize(14);
    isGuarantee.textColor = [UIColor colorWithHexString:@"#CA9F61"];
    if ([_mymodel.fault_type isEqualToString:@"3"]) {
        if ([_mymodel.is_protect boolValue]) {
            isGuarantee.text = @"保内";
        }else{
            isGuarantee.text = @"保外";
        }
    }else {
        isGuarantee.text = @"";
    }
    [self.scrollView addSubview:isGuarantee];
    
    UILabel *line2 = [[UILabel alloc]initWithFrame:CGRectMake(left1, secvicelb.bottom+10, KWIDTH-left1-20, 1)];
    line2.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    
    [self.scrollView addSubview:line2];
    
    UILabel *produrt = [[UILabel alloc]initWithFrame:CGRectMake(left1, line2.bottom+8, wei, 14)];
    produrt.font = FontSize(14);
    produrt.textColor = K999999;
    produrt.text = @"电器品类";
    [self.scrollView addSubview:produrt];
    
    UILabel *produrtlb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line2.bottom+8,KWIDTH-100, 14)];
    produrtlb.font = FontSize(14);
    produrtlb.textColor = K666666;
    produrtlb.text = _mymodel.fault_name;
    [self.scrollView addSubview:produrtlb];
    
    
    UILabel *line3 = [[UILabel alloc]initWithFrame:CGRectMake(left1, produrt.bottom+10, KWIDTH-left1-20, 1)];
    line3.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    
    [self.scrollView addSubview:line3];
    
    

    
    
    UILabel *guzhang = [[UILabel alloc]initWithFrame:CGRectMake(left1, line3.bottom+18, 90, 14)];
    guzhang.font = FontSize(14);
    guzhang.textColor = K999999;
    guzhang.text = @"备注信息";
    [self.scrollView addSubview:guzhang];
    
    
    CGFloat heig = [NSString heightWithWidth:KWIDTH-left2-left1-wei-left1-20 font:14 text:_mymodel.fault_comment];
    
    
    UILabel *guzhanglb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line3.bottom+15, KWIDTH-left2-left1-wei-left1-20, heig)];
    guzhanglb.font = FontSize(14);
    guzhanglb.textColor = K999999;
    guzhanglb.text = _mymodel.fault_comment;
    [self.scrollView addSubview:guzhanglb];
    
    
    
    UILabel *line4 = [[UILabel alloc]initWithFrame:CGRectMake(left1, guzhanglb.bottom+10, KWIDTH-left1-20, 1)];
    line4.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line4];
    
    
    UILabel *yuyueTime = [[UILabel alloc]initWithFrame:CGRectMake(left1, line4.bottom+8, 90, 14)];
    yuyueTime.font = FontSize(14);
    yuyueTime.textColor = K999999;
    yuyueTime.text = @"预约日期";
    [self.scrollView addSubview:yuyueTime];
    UILabel *yuyueTimelb = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line4.bottom+8, KWIDTH-left2-left1-wei-left1-20, heig)];
    yuyueTimelb.font = FontSize(14);
    yuyueTimelb.textColor = K666666;
//    yuyueTimelb.text = _mymodel.order_date;
    NSArray *timearr = [_mymodel.order_date componentsSeparatedByString:@"-"];
    yuyueTimelb.text = [NSString stringWithFormat:@"%@年%@月%@日",timearr[0],timearr[1],timearr[2]];
    [self.scrollView addSubview:yuyueTimelb];
    UILabel *line5 = [[UILabel alloc]initWithFrame:CGRectMake(left1, yuyueTimelb.bottom+10, KWIDTH-left1-20, 1)];
    line5.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line5];
    
    
    UILabel *yuyueTime2 = [[UILabel alloc]initWithFrame:CGRectMake(left1, line5.bottom+8, 90, 14)];
    yuyueTime2.font = FontSize(14);
    yuyueTime2.textColor = K999999;
    yuyueTime2.text = @"预约时间";
    [self.scrollView addSubview:yuyueTime2];
    UILabel *yuyueTimelb2 = [[UILabel alloc]initWithFrame:CGRectMake(left1+wei+left2, line5.bottom+8, KWIDTH-left2-left1-wei-left1-20, heig)];
    yuyueTimelb2.font = FontSize(14);
    yuyueTimelb2.textColor = K666666;
    yuyueTimelb2.text = _mymodel.order_time;
    [self.scrollView addSubview:yuyueTimelb2];
    UILabel *line6 = [[UILabel alloc]initWithFrame:CGRectMake(left1, yuyueTimelb2.bottom+10, KWIDTH-left1-20, 1)];
    line6.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line6];
    
    
    UILabel *address = [[UILabel alloc]initWithFrame:CGRectMake(left1, line6.bottom+8, 30, 14)];
    address.font = FontSize(14);
    address.textColor = K999999;
    address.text = @"地址";
    [self.scrollView addSubview:address];
    
    
    CGFloat heig2 = [NSString heightWithWidth:KWIDTH-80 font:14 text:_mymodel.user_address];
    
    
    UILabel *addresslb = [[UILabel alloc]initWithFrame:CGRectMake(67, line6.bottom+8, KWIDTH-80 , heig2)];
    addresslb.font = FontSize(14);
    addresslb.textColor = K999999;
    addresslb.text = _mymodel.user_address;
    [self.scrollView addSubview:addresslb];
    addresslb.numberOfLines = 0;
    UILabel *name = [[UILabel alloc]initWithFrame:CGRectMake(67, addresslb.bottom+12, 60, 14)];
    name.font = FontSize(14);
    name.textColor = K666666;
    name.text = _mymodel.user_name;
    [self.scrollView addSubview:name];
    UILabel *phone = [[UILabel alloc]initWithFrame:CGRectMake(name.right, addresslb.bottom+12, KWIDTH-name.right-26, 14)];
    phone.font = FontSize(14);
    phone.textColor = K666666;
    phone.textAlignment = NSTextAlignmentRight;
    phone.text = _mymodel.user_phone;
    [self.scrollView addSubview:phone];
    
    UILabel *line7 = [[UILabel alloc]initWithFrame:CGRectMake(left1, phone.bottom+10, KWIDTH-left1-20, 1)];
    line7.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
    [self.scrollView addSubview:line7];
    
    
    UILabel *dianti = [[UILabel alloc]initWithFrame:CGRectMake(left1, line7.bottom+7, 30, 14)];
    dianti.font = FontSize(14);
    dianti.textColor = K999999;
    dianti.text = @"电梯";
    [self.scrollView addSubview:dianti];
    UILabel *diantilb = [[UILabel alloc]initWithFrame:CGRectMake(67, line7.bottom+7, 30, 14)];
    diantilb.font = FontSize(14);
    diantilb.textColor = K666666;
    diantilb.text = @"无";
    if ([_mymodel.has_elevator integerValue] == 1) {
        diantilb.text = @"有";
        
    }
    [self.scrollView addSubview:diantilb];
    
    UILabel *louceng = [[UILabel alloc]initWithFrame:CGRectMake(KWIDTH-100, line7.bottom+7, 30, 14)];
    louceng.font = FontSize(14);
    louceng.textColor = K999999;
    louceng.text = @"楼层";
    [self.scrollView addSubview:louceng];
    UILabel *loucenglb = [[UILabel alloc]initWithFrame:CGRectMake(KWIDTH-80, line7.bottom+7, 50, 14)];
    loucenglb.font = FontSize(14);
    loucenglb.textColor = K666666;
    loucenglb.textAlignment = NSTextAlignmentRight;
    loucenglb.text = [NSString stringWithFormat:@"%@楼",_mymodel.floorNum];
    [self.scrollView addSubview:loucenglb];
    
    
    
    bbgvieww.frame = CGRectMake(10, 205, KWIDTH-20, loucenglb.bottom+20-205);
    bbgvieww.backgroundColor = [UIColor whiteColor];
    //    bbgvieww.layer.masksToBounds = YES;
    //    bbgvieww.layer.cornerRadius = 12;
    
    
    
    
    
    _scrollView.contentSize = CGSizeMake(KWIDTH, loucenglb.bottom+20);
}



-(void)showui{
    
    
    
    //维修(多一个故障原因的字段)
    if ([self.mymodel.fault_type isEqualToString:@"3"]) {
        //个人
        if ([self.mymodel.user_type isEqualToString:@"0"]) {
            [self setUI30];
        }
        //企业
        if ([self.mymodel.user_type isEqualToString:@"1"]) {
            [self setUI31];
        }
        //电器厂
        if ([self.mymodel.user_type isEqualToString:@"2"]) {
            [self setUI32];
        }
    }else {
        //个人
        if ([self.mymodel.user_type isEqualToString:@"0"]) {
            [self setUI0];
        }
        //企业
        if ([self.mymodel.user_type isEqualToString:@"1"]) {
            [self setUI1];
        }
        //电器厂
        if ([self.mymodel.user_type isEqualToString:@"2"]) {
            [self setUI2];
        }
    }
    
    
   
   
    
    
}

-(void)jiedanction:(UIButton *)but{
 
}
-(void)rightbuttobuttoaction:(UIButton *)but{
   
}
- (UIScrollView *)scrollView {
    if (!_scrollView) {
        _scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, kNaviHeight, KWIDTH, KHEIGHT-kNaviHeight)];
        _scrollView.backgroundColor = [UIColor colorWithHexString:@"#F2F2F2"];
        _scrollView.delegate = self;
        adjustInset(_scrollView);
    }
    return _scrollView;
}







@end
